Class java.awt.EventQueue
All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.EventQueue
Object
|
+----java.awt.EventQueue
- public class EventQueue
- extends Object
EventQueue is a platform-independent class that queues events, both
from the underlying peer classes and from trusted application classes.
There is only one EventQueue for the system.
- Version:
- 1.21 07/21/98
- Author:
- Thomas Ball
-
java.awt.EventQueue()
-
-
getNextEvent()
- Remove an event from the queue and return it.
-
peekEvent()
- Return the first event without removing it.
-
peekEvent(int)
-
-
postEvent(AWTEvent)
- Post a 1.1-style event to the EventQueue.
EventQueue
public EventQueue()
getNextEvent
public synchronized java.awt.AWTEvent getNextEvent() throws InterruptedException
- Remove an event from the queue and return it. This method will
block until an event has been posted by another thread.
- Returns:
- the next AWTEvent
- Throws: InterruptedException
-
if another thread has interrupted this thread.
peekEvent
public synchronized java.awt.AWTEvent peekEvent()
- Return the first event without removing it.
- Returns:
- the first event, which is either an instance of java.awt.Event
or java.awt.AWTEvent.
peekEvent
public synchronized java.awt.AWTEvent peekEvent(int id)
postEvent
public synchronized void postEvent(AWTEvent theEvent)
- Post a 1.1-style event to the EventQueue.
- Parameters:
- theEvent - an instance of java.awt.AWTEvent, or a
subclass of it.
All Packages Class Hierarchy This Package Previous Next Index